package com.cskaoyan.controller;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.DashBoardVO;
import com.cskaoyan.service.IndexServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author
 * @date 2020/12/5 15:00
 */
@RestController
@RequestMapping("admin")
public class IndexController {

    @Autowired
    IndexServiceImpl indexService;

    @RequestMapping("dashboard")
    public BaseRespVo dashboard(){
        DashBoardVO boardVO = indexService.selectTotal();
        return BaseRespVo.ok(boardVO);
    }
}
